package com.wry.cloud.utils;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * <h1> 消息封装返回 </h1>
 *
 * @author <a href="mailto::15671496069@163.com">WeiRuYuan</a>
 * @since 2022/9/4
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
public class ApiResult<T> implements Serializable {
    private static final long serialVersionUID = -1L;

    /**
     * 状态码
     */
    private Integer code;

    /**
     * 描述信息
     */
    private String message;

    /**
     * 返回数据
     */
    private T data;


    public ApiResult(Integer code, String message) {
        this.code = code;
        this.message = message;
    }
}
